<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>天使随心飞</title>
    <style>
        img{
            position: absolute;

        }
    </style>
</head>
<body>
    <img src="../../Img/angel.gif">
    <script>
        var pic = document.querySelector('img');
        console.log(pic)
        document.addEventListener('mousemove', function (e) {
        	var x = e.pageX;
        	var y = e.pageY;
        	pic.style.left = x - 50 + 'px';
        	pic.style.top = y - 40 + 'px';
        })
    </script>
</body>
</html>